import request from "@/utils/request";
export const getTplListAPi = (params?: any) => {
  return request({
    url: "/contract/tpl/list",
    method: "get",
    params,
  });
};

export const getTplInfoApi = (id: number) => {
  return request({
    url: "/contract/tpl/" + id,
    method: "get",
  });
};

export const addTplApi = (data: any) => {
  return request({
    url: "/contract/tpl/add",
    method: "post",
    data,
  });
};
export const editTplApi = (data: any) => {
  return request({
    url: "/contract/tpl/edit",
    method: "put",
    data,
  });
};
export const delTplApi = (id: number) => {
  return request({
    url: "/contract/tpl/delete/" + id,
    method: "delete",
  });
};

export const getListAPi = (params?: any) => {
  return request({
    url: "/contract/list",
    method: "get",
    params,
  });
};

export const getInfoApi = (id: number) => {
  return request({
    url: "/contract/" + id,
    method: "get",
  });
};

export const addContractApi = (data: any) => {
  return request({
    url: "/contract/add",
    method: "post",
    data,
  });
};

export const delApi = (id: number) => {
  return request({
    url: "/contract/" + id,
    method: "delete",
  });
};
